<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;

class Timetable extends Model
{
    protected $fillable = [
        'name',
        'start_time',
        'end_time',
    ];


    public function users()
    {
        return $this->belongsToMany(User::class, 'works', 'timetable_id', 'user_id');
    }

}
